using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.UserContrl
{
	public class SimplePluginSetCtrl : PluginSettingBaseCtrl
	{
		private string mButtonText;
		private RoutedEventHandler mButtonHandler;
		internal Grid LayoutRoot;
		internal ClickableLayout pluginItem;
		internal TextBlock textButton;
		private bool _contentLoaded;
		public SimplePluginSetCtrl(string buttonText, RoutedEventHandler buttonHandler)
		{
			this.InitializeComponent();
			base.add_Loaded(new RoutedEventHandler(this.onControlLoaded));
			this.mButtonText = buttonText;
			this.mButtonHandler = buttonHandler;
		}
		private void onControlLoaded(object sender, RoutedEventArgs e)
		{
			if (this.mButtonText != null)
			{
				this.textButton.set_Text(this.mButtonText);
			}
		}
		public override void Exit()
		{
			base.Exit();
		}
		private void button_Click(object sender, RoutedEventArgs e)
		{
			if (this.mButtonHandler != null)
			{
				this.mButtonHandler.Invoke(sender, e);
			}
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/SimplePluginSetCtrl.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.pluginItem = (ClickableLayout)base.FindName("pluginItem");
			this.textButton = (TextBlock)base.FindName("textButton");
		}
	}
}
